# -*- coding:utf-8 -*-
# author: lkz
# date: 2015/11/06 10:13

from celery import Celery
from kombu import Queue, Exchange


class Config(object):
    CELERY_DEFAULT_QUEUE = 'test'

    CELERY_QUEUES = (
        Queue('test', Exchange('default_exchange'), routing_key='test'),
    )

    CELERY_DEFAULT_EXCHANGE = 'default_exchange'
    CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
    CELERY_DEFAULT_ROUTING_KEY = 'test'

    CELERY_IMPORTS = (
        "proj.tasks",
    )

    BROKER_URL = "amqp://sina:rabbit@10.73.17.247:5672/test"


test_celery = Celery()
test_celery.config_from_object(Config)